package String;

import java.util.Arrays;

public class SplitDemo {
    public static void main(String[] args) {
        String line = "abc123def456ghi789j";
        String[] date = line.split("[0-9]+");
        System.out.println(Arrays.toString(date));
        line = "123.456.789";
        date = line.split("\\.");
        System.out.println(Arrays.toString(date));
        line = ".123..456..789.....";
        date = line.split("\\.");
        System.out.println(Arrays.toString(date));
        System.out.println(date.length);
    }
}
